package com.zy.explore.design.patterns.observer;


/**
 * 观察者模式测试
 *
 * @author 中国印
 * @date 2021/11/03
 */
public class ObserverPatternTest {

    public static void main(String[] args) {
        Observerable o = new Observerable();
        o.addObserver(new EmailObserver());
        o.addObserver(new IMMessageObserver());
        o.addObserver(new MobileNoObserver());
        o.notifyAllObservers(4);
    }

}
